
import {agreementList} from "@/api/content";
import {baseConfig} from "@/api/base";

const state = {
    config: '', // 默认配置
    rateList: [], // 汇率列表
};
const mutations = {
    setConfig(state, info) {
        // 设置配置
        state.config = info;
    }
};
const actions = {
    getConfig({commit}) {
        // 获取配置
        return new Promise((resolve, reject)=>{
            baseConfig().then((res) => {
                commit('setConfig', res.result);
                resolve();
            }).catch(()=>{
                reject();
            })
        })
    }
};


export default  {
    state,
    actions,
    mutations
}
